import { defineConfig } from "vite";
import path from "path";
import react from "@vitejs/plugin-react";

// https://vitejs.dev/config/
export default defineConfig({
  base: "./",
  plugins: [react()],
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "src"),
      "#": path.resolve(__dirname, ""),
      mock: path.join(__dirname, "mock"),
    },
  },
  css: {
    preprocessorOptions: {
      // scss: {
      //   additionalData: `@import "@/assets/styles/_var.scss";`
      // },
      less: {
        javascriptEnabled: true,
        additionalData: `@import "@/assets/styles/_var.less";`,
      },
    },
  },
});
